package cn.com.demo.tp31.controller;

import cn.com.demo.tp31.service.MainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("Permission")
public class MainController {
    @Autowired
    private MainService mainService;
    @GetMapping("delete/{id}")
    public boolean deletebyid(@PathVariable int id){
       boolean is = true;
        int num=-1;
      num = this.mainService.deleteById(id);
        if (num!= -1){
            is=true;
        }
        return is;
    }
}
